{literal}
<script type="text/javascript">
$(document).ready(function() {
	swfu = new SWFUpload({
		flash_url : "{/literal}{$templateUrl}{literal}Input/swfUpload/swfupload.swf",
		upload_url: "{/literal}{$input->handlerUrl}{literal}",
		post_params: {"PHPSESSID" : "{/literal}{$sessionId}{literal}"},
		file_size_limit : "100 MB",
		file_types : "{/literal}{$input->fileTypes}{literal}",
		file_types_description : "All Files",
		file_upload_limit : 100,
		file_queue_limit : 0,
		custom_settings : {
			progressTarget : "fg_uploadProgress_{/literal}{$input->id}{literal}",
			cancelButtonId : "fg_uploadCancel_{/literal}{$input->id}{literal}"
		},
		debug: false,

		// Button settings
		button_image_url: "{/literal}{$templateUrl}{literal}Input/swfUpload/images/buttons2.png",
		button_width: "104",
		button_height: "21",
		button_placeholder_id: "fg_uploadButton_{/literal}{$input->id}{literal}",
		//button_text: '<span class="theFont">Vali failid</span>',
		//button_text_style: ".theFont { font-size: 12; font:Verdana; }",
		//button_text_left_padding: 15,
		//button_text_top_padding: 1,
		button_cursor: SWFUpload.CURSOR.HAND,
		
		// The event handler functions are defined in handlers.js
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		queue_complete_handler : queueComplete
	});
 });
</script>

{/literal}
{$input->textBefore}
<div class="fg_uploadPanel">
	<div style="float:left;">
	<span id="fg_uploadButton_{$input->id}"></span>
	</div>
	<div class="fg_button" id="{$input->name}-button" onclick="document.location='{$input->refreshUrl}'" onmousedown="this.className='fg_button fg_button_click';" onmouseup="this.className='fg_button'" onmouseout="this.className='fg_button'">
		<div class="fg_left"></div>
		<div class="fg_middle">Uuenda</div>
		<div class="fg_right"></div><br style="clear:left;"/>
	</div>
	<span id="fg_uploadCancel_{$input->id}"></span>
</div>
<div id="fg_uploadProgress_{$input->id}"></div>
<!--  <div><textarea id="SWFUpload_Console" wrap="off" rows="30" cols="70"></textarea></div>-->
{$input->textAfter}